<template>
    <div class="goods-item" @click="$router.push({name:'detial',params:{id:itemdata.id}})">
        <img :src="itemdata.list_pic_url" alt="" class="goods-item-img">
        <div class="goods-item-name">{{itemdata.name}}</div>
        <div class="goods-item-price">￥{{itemdata.retail_price}}</div>
    </div>
</template>

<script setup lang="ts">
defineProps<{
    itemdata:HomeNs.InewCategory
}>()
</script>

<style scoped lang="scss">
.goods-item {
    width: 1.75rem;
    height: 2.30rem;
    // background: green;
    margin-top: 10px;

    .goods-item-img {
        width: 1.75rem;
        height: 1.75rem;
        background: #fff;
    }

    .goods-item-name {
        font-size: 13px;
        color: #333333;
        margin-top: 8.5px;
        white-space: nowrap;
        width: 1.54rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .goods-item-price {
        color: #9e4242;
        font-size: 13px;
        margin-top: 3px;
    }
}</style>